-
Notifications
You must be signed in to change notification settings - Fork 88
fix: fixes debug_traceBlockByNumber response to not be null for a transaction with no internal calls #4440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: fixes debug_traceBlockByNumber response to not be null for a transaction with no internal calls #4440
Conversation
Signed-off-by: Simeon Nakov <[email protected]>
Test Results 20 files ±0 265 suites ±0 20m 40s ⏱️ -51s For more details on these failures, see this check. Results for commit 510bc1a. ± Comparison against base commit 533a976. ♻️ This comment has been updated with latest results. |
I can't seem to reproduce this issue. Block 0x5067CB1 (mentioned in the associated ticket) contains two {
"result": [
{
"txHash": "0xa74c140aedec484c5c6cb559aecd75386d15cbafcc3e55c90d5302adbea86337",
"result": {
"type": "CALL",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"to": "0x3c2269811836af69497e5f486a85d7316753cf62",
"value": "0x0",
"gas": "0xaae60",
"gasUsed": "0x88b80",
"input": "0x3161b7f600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000016f000000000000000000000000000000000000000000000000000002109014be420000000000000000000000000000000000000000000000000000000005f86e6b0000000000000000000000000000000000000000000000000000000000000010",
"output": "0x",
"calls": [
{
"type": "DELEGATECALL",
"from": "0x3c2269811836af69497e5f486a85d7316753cf62",
"to": "0x4ee2f9b7cf3a68966c370f3eb2c16613d3235245",
"gas": "0xa1b93",
"gasUsed": "0x2a78",
"input": "0x3161b7f600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000016f000000000000000000000000000000000000000000000000000002109014be420000000000000000000000000000000000000000000000000000000005f86e6b0000000000000000000000000000000000000000000000000000000000000010",
"output": "0x",
"value": "0x0"
}
]
}
}
],
"jsonrpc": "2.0",
"id": 1
} Am I missing something or it's just too late to use that block now? |
Couple of questions left on the associated ticket as well #4386 (comment) |
@quiet-node hmm, I also can't reproduce it along with other examples I had written down. (perhaps it was a bug on MN side due to modularization, that is now fixed?). Nevertheless, I still think we should fix the response format for this particular case. I will try to find another example. |
Yeah let's bring this up to a parking lot session and discuss as a team |
Signed-off-by: Simeon Nakov <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4440 +/- ##
==========================================
- Coverage 96.23% 96.22% -0.01%
==========================================
Files 121 121
Lines 20001 19998 -3
Branches 1755 1750 -5
==========================================
- Hits 19247 19244 -3
Misses 735 735
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Description
When calling debug_traceBlockByNumber for a block, and some transaction from the block hasn't made any calls, then null would be returned for that transaction. The result should be the root call object with an empty calls array instead of null. We build the root object from the same fields in the transaction object that would back the root call:
from
,to
,value
,gas
,gasUsed
,input
,output
/error
(fromtransactionsResponse
) andcalls: []
.actionsResponse[0].call_type
fortype
. When actions are absent, we infertype
as"CALL"
ifto
exists, otherwise"CREATE"
. Everything else matches the root call data.Related issue(s)
Fixes #4386
Testing Guide
debug_traceBlockByNumber
for a block that contains a transaction with no callsChanges from original design (optional)
N/A
Additional work needed (optional)
N/A
Checklist